package com.design.singleton.plus;

/**
 * @Author: xiemiao
 * @CreateTime: 2023-05-15  16:56
 * @Description: 静态内部类实现单例
 * @Version: 1.0
 */
public class StaticSingleton {
    private StaticSingleton() {

    }

    private static class HolderClass {
        private static final StaticSingleton instance = new StaticSingleton();
    }

    public static StaticSingleton getInstance() {
        return HolderClass.instance;
    }
}
